package edu.java.lectures.lec15.collections.usage;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CollectionsTest {

    public static void main(String[] args) {
	List<String> strList = new ArrayList<String>();
	strList.add("b");
	strList.add("a");
	strList.add("3");
	strList.add("h");
	strList.add("o");
	strList.add("i");

	Collections.sort(strList);
	System.out.println(strList);

	List<Thing> thingsList = new ArrayList<Thing>();

	thingsList.add(new Thing("b"));
	thingsList.add(new Thing("c"));
	thingsList.add(new Thing("a"));

	// impossible:
	// Collections.sort(thingsList); // Comparable implementation missing
	// System.out.println(thingsList);
    }
}
